package org

import (
	"d-serv-go/server/core/db"
	"d-serv-go/server/core/serv"
)

type RoleUserServ struct {
	serv.CommServ
}

func (u *RoleUserServ) BeforeSave(paramBean *db.ParamBean) {
	user := paramBean.GetSaveFullData();
	//清除菜单信息
	//db.UserMgr.ClearMenuByUsers(user.GetStr("USER_CODE"));
	//db.UserMgr.ClearCacheMenuList(user.GetStr("USER_CODE"));
	//db.UserMgr.ClearMenuTime(user.GetStr("USER_CODE"));
	//清除缓存中的用户扩展信息
	userBean := db.UserMgr.GetCacheUser(user.GetStr("USER_CODE"));
	if (userBean != nil) {
		userBean.ClearUserExt()
	}
	//db.UserMgr.ClearUserCache(user.GetStr("USER_CODE"));
	//db.UserMgr.ClearCacheVarMap(user.GetStr("USER_CODE"));
}
